<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.css">
    <script type="text/javascript" src="../js/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap.js"></script>
</head>
<body>
<h2 style="text-align:center;letter-spacing:40px;color:pink">欢迎来到修改新闻界面</h2>
<div>
    <img src="../images/news1.png" style="width:100% ;height:150px">
</div>
<div class="container">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">修改新闻</h3>
        </div>
        <div class="panel-body">
            <form role="form" action="UpdateNewsServlet?newId=${newsdemo.newId}" method="post">
                <div class="form-group">
                    <label for="title">新闻标题</label>
                    <input type="text"  value="${newsdemo.title }"
                           class="form-control" id="title" name="title" placeholder="新闻标题">
                </div>
                <div class="form-group">
                    <select name="boardId">
                        <option>--请选择板块名字--</option>
                        <c:forEach items="${listboard}" var="board">
                            <option value="${board.boardId}"
                            <c:if test="${newsdemo.boarddemo.boardId eq board.boardId}">selected</c:if> >
                                    ${board.boardName}
                            </option>
                        </c:forEach>
                    </select>
                </div>
                <div class="form-group">
                    <label for="context">新闻内容</label>
                    <input type="text"  value="${newsdemo.context }"
                           class="form-control" id="context" name="context" placeholder="新闻内容">
                </div>
                <button type="submit" class="btn btn-primary btn-sm active">确认修改</button>
            </form>
        </div>

    </div>
</div>
</body>
</html>